import request from '@/utils/request'
var PATH = "/address"
export default {
    //查询全部的地址
    getAddress(page,size) {
        return request({
            url: `${PATH}/list?page=${page}&size=${size}`,
            method: "get"
        })
    },
 
    /* id 修改 默认地址*/
    updateAddress(address){
        return request({
            url: `${PATH}/updateDf`,
            method: "post",
            data:address
        })
    },

    //地址添加
    saveAddress(address){
        return request({
            url: `${PATH}/save`,
            method: "post",
            data:address
        })
    },

    //id 删除
    deleteAddress(id){
        return request({
            url: `${PATH}/delete/${id}`,
            method: "delete"
        })
    },

    //修改 
    update(address){
        return request({
            url: `${PATH}/update`,
            method: "post",
            data:address
        })
    },

     //查询默认的地址
    findByIdDf(){
        return request({
        url: `${PATH}/findById`,
        method: "get"
        
    })
    }
}